#ifndef GLWIDGET_H
#define GLWIDGET_H

#include <QtOpenGL>

class Scene;
class Camera;


class GLWidget : public QGLWidget
{
    Q_OBJECT

public:
    GLWidget(QWidget *parent = 0);
    ~GLWidget();

    void setScene(Scene* scene);

protected:
    void initializeGL();
    void paintGL();
    void resizeGL(int width, int height);

    void keyPressEvent ( QKeyEvent * event );
    void mousePressEvent(QMouseEvent *);
    void mouseReleaseEvent(QMouseEvent *);
    void mouseMoveEvent(QMouseEvent *);
    void wheelEvent(QWheelEvent *);

private:
    Scene*    m_scene;
    QPoint m_currentPos;
    bool m_spinning;
};

#endif
